﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;

namespace EmployeeLeaveSystem.Shared.Models {
    public class SalaryInfo {
        [Display(Name = "编号")]
        public int Id { get; set; }
        [Display(Name = "年份")]
        public int Year { get; set; }
        [Display(Name = "月份")]
        public int Month { get; set; }
        [Display(Name = "员工ID")]
        public int StaffId { get; set; }
        public StaffInfo? Staff { get; set; }
        [Display(Name = "基础工资")]
        public double BaseSalary { get; set; } // 基本薪水
        [Display(Name = "奖励工资")]
        public double AddLiveSalary { get; set; } // 住房补贴 和 加班奖励 
        [Display(Name = "扣除工资")]
        public double CutOffSalary { get; set; } // 实际扣款（消减）
        [Display(Name = "实际工资")]
        public double ActualSalary { get { return BaseSalary + AddLiveSalary - CutOffSalary + CustomSalary; } }
        [Display(Name = "浮动薪水")]
        public double CustomSalary { get; set; }
        [Display(Name = "理由")]
        public String Reason { get; set; } = String.Empty;
        [Display(Name = "审核状态")]
        public AcceptFlag AcceptFlag { get; set; }
        
    }
}
